public class Test5 {
    public static void main(String[] args) {
        //把String对象转变为StringBuilder对象
        String s = "hello";
        //可变的对象
        StringBuilder stringBuilder = new StringBuilder(s);
        stringBuilder.append("abcd");
        System.out.println(stringBuilder);

        StringBuffer sb = new StringBuffer();
        sb.append("fdsa");
        //把stringBuilder对象 转变为String对象
        String s1 = stringBuilder.toString();
        System.out.println(s1);



    }
}
